//
// Created by wayne on 18-11-19.
//

#ifndef ENGINE_RACE_KEYLOCATION_H
#define ENGINE_RACE_KEYLOCATION_H

#include <stdint.h>

class KeyLocation {
public:
    KeyLocation() : key(0), location(0) {

    }

    KeyLocation(const uint64_t &key, const uint64_t &location) : key(key), location(location) {
    }

    static bool compare(const KeyLocation &left, const KeyLocation &right) {
        if (left.key != right.key) {
            return left.key < right.key;
        }
        return left.location < right.location;
    }

    static bool uint64CompareKey(const uint64_t &a, const KeyLocation &b) {
        return a < b.key;
    }

    uint64_t key;
    int location;
};


#endif //ENGINE_RACE_KEYLOCATION_H
